using Avalonia.Data.Converters;
using System;
using System.Globalization;

namespace AvaloniaUiKit.SampleApp.Converters
{
    public class BoolToStringConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if (value is bool boolValue && boolValue && parameter is string stringParam)
            {
                return stringParam;
            }
            return string.Empty;
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }

        public static readonly BoolToStringConverter Instance = new BoolToStringConverter();
    }
} 